package com.neusoft.elmboot.service;

import java.util.List;

import com.neusoft.elmboot.po.OrderDetailet;
import com.neusoft.elmboot.po.Orders;

public interface OrdersService {

	int createOrders(Orders orders);
	Orders getOrdersById(Integer orderId);
	List<Orders> listOrdersByUserId(String userId);

	void updateOrderState(Integer state, Integer orderId);
	
	/**
	 * 支付时更新订单状态并记录支付方式
	 */
	void updateOrderStateWithPaymentType(Integer state, String paymentType, Integer orderId);

	/**
	 * 更新订单的退款状态和原因
	 */
	void updateRefundInfo(Integer orderId, Integer refundStatus, String refundReason);

    List<Orders> listOrdersByBusinessId(String businessId);

	List<OrderDetailet> getOrderDetailetByOrderId(Integer orderId);

    void cancelOrder(Integer orderId);

	Integer getOrderId(String userId, String businessId, String orderDate);
	
	/**
	 * 使用优惠券创建订单
	 */
	int createOrdersWithCoupon(Orders orders, Integer couponId);

	/**
	 * 获取商家今日订单统计
	 */
	java.util.Map<String, Object> getTodayOrderStats(String businessId);

	/**
	 * 获取商家月度订单统计
	 */
	java.util.Map<String, Object> getMonthlyOrderStats(String businessId);
}
